//
//  AFTools.h
//  网络封装
//
//  Created by dllo on 15/9/30.
//  Copyright © 2015年 直到世界的尽头. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "AFNetworking.h"  

typedef void(^myBlock)(id data);

@interface AFTools : NSObject

//GET可以得到一些POST的数据
/**GET请求数据*/
+(void)getDataByURLString:(NSString *)urlString
            WithDataBlock:(myBlock)dataBlock;

/**POST请求数据*/
+(void)postDataByURLString:(NSString *)urlString
                   BodyDic:(NSDictionary *)bodyDic
             WithDataBlock:(myBlock)dataBlock;

/**万能JSON解析*/
+(void)dataByURLString:(NSString *)urlString
               BodyDic:(NSDictionary *)bodyDic
         WithDataBlock:(myBlock)dataBlock;

/**POST请求数据(NSString)*/
+(void)postDataByURLString:(NSString *)urlString
                BodyString:(NSString *)bodyString
             WithDataBlock:(myBlock)dataBlock;

@end
